USE GESTION2
go
IF OBJECT_ID('dbo.WASP_D0004_LIMPIADOR_DE_TABLAS') IS NOT NULL
BEGIN
    DROP PROCEDURE dbo.WASP_D0004_LIMPIADOR_DE_TABLAS
    IF OBJECT_ID('dbo.WASP_D0004_LIMPIADOR_DE_TABLAS') IS NOT NULL
        PRINT '<<< FAILED DROPPING PROCEDURE dbo.WASP_D0004_LIMPIADOR_DE_TABLAS >>>'
    ELSE
        PRINT '<<< DROPPED PROCEDURE dbo.WASP_D0004_LIMPIADOR_DE_TABLAS >>>'
END
go
SET ANSI_NULLS ON
go
SET QUOTED_IDENTIFIER ON
go
CREATE PROCEDURE [dbo].[WASP_D0004_LIMPIADOR_DE_TABLAS]
AS

BEGIN
if exists (select * from dbo.sysobjects where id = object_id(N'[OPAPF000]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [OPAPF000]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[bloqueo_empresa]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[bloqueo_empresa]

if exists (select * from dbo.sysobjects where id = object_id(N'[fax]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [fax]

if exists (select * from dbo.sysobjects where id = object_id(N'[TotalTabajador]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [TotalTabajador]

if exists (select * from dbo.sysobjects where id = object_id(N'[NumeroTelefono]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [NumeroTelefono]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AS_OPAPF000]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table dbo.[AS_OPAPF000]
END
go
SET ANSI_NULLS OFF
go
SET QUOTED_IDENTIFIER OFF
go
IF OBJECT_ID('dbo.WASP_D0004_LIMPIADOR_DE_TABLAS') IS NOT NULL
    PRINT '<<< CREATED PROCEDURE dbo.WASP_D0004_LIMPIADOR_DE_TABLAS >>>'
ELSE
    PRINT '<<< FAILED CREATING PROCEDURE dbo.WASP_D0004_LIMPIADOR_DE_TABLAS >>>'
go
